export const CopyDeepTargetPropValPreHandlerType_Name = 'CopyDeepTargetPropValPreHandlerType'

/**
 * 深度拷贝配置选项中原始对象属性的属性值拷贝到目标对象目标属性时，对目标对象目标属性属性值预处
 * 理函数的类型
 */
export type CopyDeepTargetPropValPreHandlerType = Record<
  string,
  (
    origin: Record<string, any>,
    originPropVal: any,
    originPropName: string,
    targetPropName: string
  ) => any
>

export const CopyDeepOptionsType_Name = 'CopyDeepOptionsType'

/**
 * 深度拷贝配置选项的类型
 */
export type CopyDeepOptionsType = {
  props?: string[]
  excludeProps?: string[]
  isCopyObjUndefinedProp?: boolean
  isCopyObjNullProp?: boolean
  isCopyObjEmptyArrProp?: boolean
  propsMap?: Record<string, string | string[]>
  targetPropValPreHandler?: CopyDeepTargetPropValPreHandlerType
  excludeArrItem?: (item: any) => boolean
  isCopyArrUndefinedItem?: boolean
  isCopyArrNullItem?: boolean
  isCopyArrEmptyArrItem?: boolean
  sort?: (a: any, b: any) => number
}
